#

| Chapter 21 More About Managing Files |

## 21.13 Read an Inode with stat

The stat program reads an inode (1.22). stat shows you the information that the stat(2) system call gives about a file (or directory or socket or...). The atime (21.5), mtime (16.2), and ctime (21.6) are shown, along with the elapsed time since. For example:

>     % ls -l ptco
>     -r-xr-xr-x  2 jerry        3203 Mar 24 05:33 ptco
>     % stat ptco
>       File: "ptco"
>       Size: 3203     Allocated Blocks: 8    Filetype: Regular File
>       Mode: (0555/-r-xr-xr-x)   Uid: (115/jerry)  Gid: (100/staff)
>     Device:  7,18  Inode: 172255    Links: 2
>     Access: Fri May  8 01:00:30 1992(00000.05:48:13)
>     Modify: Tue Mar 24 05:33:43 1992(00045.00:15:01)
>     Change: Fri May  8 06:48:42 1992(00000.00:00:02)

- JP

21.12 Copying Files to a Directory |  | 21.14 Automatically Appending the Date to a Filename